pagurus 0.3.0

Ultra-portable game engine suited for offline 2D games powered by WebAssembly
Documentation

pagurus

pagurus Documentation Actions Status License

🐚+🦞 Ultra-portable Rust game engine suited for offline 2D games powered by WebAssembly.

Examples

Snake

Traditional snake game: examples/snake_game

You can play this game on itch.io.

How to build and run locally

Build the game:

$ cargo build --release -p snake_game --target wasm32-unknown-unknown
$ ls target/wasm32-unknown-unknown/release/snake_game.wasm

Run the game using SDL:

$ cargo run --release -p sdl_runtime -- target/wasm32-unknown-unknown/release/snake_game.wasm

// or

$ cargo run --release -p sdl_snake

Run the game on Android:

$ cargo install cargo-apk
$ cargo apk run --release --lib -p android_snake

Run the game on a Web Browser:

$ cd pagurus_web/
$ npm install
$ npm run build
$ npm run example  // A HTTP server listening on 8888 port will start

$ open http://localhost:8888/examples/web_snake/

Run the game on a terminal (audio is disabled):

$ cargo run --release -p tui_runtime -- target/wasm32-unknown-unknown/release/snake_game.wasm